package com.example.djetpack.lifecycle

import android.util.Log
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleObserver
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.OnLifecycleEvent


/**
 * Author: shuhong
 * Date: 2020/9/9 17:26
 * Description:
 */
class LocationObserver1 :LifecycleObserver {

    @OnLifecycleEvent(Lifecycle.Event.ON_START)
    fun onStart(lifecycleOwner: LifecycleOwner){
        Log.d(TAG, "onStart: ")
    }
    
    @OnLifecycleEvent(Lifecycle.Event.ON_STOP)
    fun onStop(lifecycleOwner: LifecycleOwner){
        Log.d(TAG, "onStop: ")
    }

    companion object {
        private const val TAG = "LocationObserver"
    }
}